<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="Shortcut Icon" href="../images/aecc.ico" type="image/x-icon" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="../StaticFiles/element-ui/element-ui.css">
  <link rel="stylesheet" href="../StaticFiles/nprogress/nprogress.min.css">
  <link rel="stylesheet" href="../styles/vue-page-common.css">
  <script src="../Scripts/vue.min.js"></script>
  <script src="../StaticFiles/element-ui/element-ui.js"></script>
  <script src="../Scripts/axios.min.js"></script>
  <script src="../StaticFiles/nprogress/nprogress.min.js"></script>
  <script src="../Scripts/dayjs.min.js"></script>
  <script src="../Scripts/axios.config.js"></script>
  <script src="../Scripts/datav.min.vue.js"></script>
  <script src="../Scripts/lodash.min.js"></script>
  <title>检验周期统计看板</title>
  <style>
    html {
      background-image: url(../images/bg.jpg);
      color: #fff;
    }

    .el-form-item__label {
      color: #fff;
    }

    .el-date-editor--daterange.el-input,
    .el-date-editor--daterange.el-input__inner,
    .el-date-editor--timerange.el-input,
    .el-date-editor--timerange.el-input__inner {
      width: 300px !important;
    }

    .el-form-item {
      margin-bottom: 15px;
    }
  </style>
</head>

<body>
  <div id="app">
    <div style="padding:0 5px;">
      <!-- 看板标题组件 -->
      <vue2-board-header :title="'检验周期统计看板'"></vue2-board-header>
      <!-- 查询条件区 -->
      <el-form id="queryInfo" :inline="true" :model="queryInfo" ref="queryInfoRef" :label-position="'left'"
        :rules="rules" style="margin:5px;">
        <el-form-item label="主制分厂:">
          <el-select v-model="queryInfo.factoryname" placeholder="请选择" filterable clearable
            @change="factorySelectChange" style="width:170px;">
            <el-option v-for="f in factoryList" :key="f.factoryid" :label="f.factoryname" :value="f.factoryname">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="主制工区:">
          <el-select v-model="queryInfo.workcentername" placeholder="请选择" filterable clearable style="width:170px;">
            <el-option v-for="w in workcenterList" :key="w.workcenterid" :label="w.workcentername"
              :value="w.workcentername">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="机型:">
          <el-select v-model="queryInfo.productfamilyname" placeholder="请选择机型" clearable filterable
            style="width:170px;">
            <el-option v-for="i in productFamilyList" :key="i.productfamilyname" :label="i.productfamilyname"
              :value="i.productfamilyname">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item prop='productname' label="订单号:">
          <el-autocomplete v-model.trim="queryInfo.mfgordername" placeholder="请输入订单号" :trigger-on-focus="false"
            :fetch-suggestions="searchMfgorderAsync" :value-key="'mfgordername'" :debounce="500">
          </el-autocomplete>
        </el-form-item>

        <el-form-item prop='productname' label="零件图号:">
          <el-autocomplete v-model.trim="queryInfo.productname" placeholder="请输入零件图号" :trigger-on-focus="false"
            :fetch-suggestions="searchProductAsync" :value-key="'productname'" :debounce="500">
          </el-autocomplete>
        </el-form-item>

        <el-form-item prop='containername' label="流水卡号:">
          <el-autocomplete v-model.trim="queryInfo.containername" placeholder="请输入流水卡号" :trigger-on-focus="false"
            style="width:240px;" :fetch-suggestions="searchContainerAsync" :value-key="'containername'" :debounce="500">
          </el-autocomplete>
        </el-form-item>

        <el-form-item label="检验员:">
          <el-select v-model="queryInfo.checker" placeholder="请选择" filterable clearable style="width:120px;">
            <el-option v-for="w in checkerList" :key="w.employeeid" :label="w.fullname" :value="w.fullname">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="检验时间:">
          <el-date-picker v-model="queryInfo.checkdate" type="daterange" range-separator="至" value-format="yyyy-MM-dd"
            start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
        </el-form-item>

        <el-form-item label="报工时间:" prop="reportdate">
          <el-date-picker v-model="queryInfo.reportdate" type="daterange" range-separator="至" value-format="yyyy-MM-dd"
            start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
        </el-form-item>

        <el-form-item label="检验间隔天数:" prop="interval">
          <el-input-number v-model="queryInfo.interval" :min="0" :step="1" step-strictly>
          </el-input-number>
        </el-form-item>

        <el-form-item>
          <el-form-item label="工序类型:">
            <el-select v-model="queryInfo.spectype" placeholder="请选择" filterable clearable style="width:120px;">
              <el-option v-for="item in spectypeList" :key="item.spectype" :label="item.spectype"
                :value="item.spectype">
              </el-option>
            </el-select>
          </el-form-item>
          <template slot="label">
            <el-popover placement="top-start" title="工序类型定义如下" width="400" trigger="hover">
              <i class="el-icon-info" slot="reference"></i>
              <p>【普通工序】：既不是检序也不是转工序。</p>
              <p>【检验工序】：仅是检序，但不是转工序。</p>
              <p>【转工检验工序】：既是检序又是转工序。</p>
            </el-popover>
          </template>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="small" @click="getData">查询</el-button>
        </el-form-item>
      </el-form>

      <dv-border-box-11 :title="'超' +queryInfo.interval+ '天检验统计'">
        <div :style="{height: chartHeight + 'px',paddingTop:'40px'}" id="factoryChart"></div>
      </dv-border-box-11>

      <dv-border-box-11 :title="'超' +queryInfo.interval+ '天检验'">
        <div :style="{height: chartHeight + 'px',paddingTop:'40px'}" id="checkStockChart"></div>
      </dv-border-box-11>

      <!-- 超x天已检统计 -->
      <el-dialog :title="factoryChartDetail.title" :width="'98%'" :top="'10px'"
        :visible.sync="factoryChartDetail.dialogVisiable" :center="true">
        <el-table v-loading="loading" v-loading.fullscreen.lock="loading" :element-loading-text="loadingText"
          element-loading-background="rgba(0,0,0,0.8)" :data="factoryChartDetail.dataList" stripe border>
          <el-table-column type="index" width="50"></el-table-column>
          <el-table-column label="操作" width="200">
            <template slot-scope="scope">
              <el-button type="primary" icon="el-icon-download" size="mini" @click="exportFactoryChartDetail">
                导出
              </el-button>
              <el-button type="warning" icon="el-icon-check" size="mini" @click="validateRowData(scope.row)">
                校验
              </el-button>
            </template>
          </el-table-column>
          <el-table-column label="containersteprecordid" prop="containersteprecordid" v-if="false"></el-table-column>
          <el-table-column label="主制分厂" prop="factoryname" width="80" show-overflow-tooltip></el-table-column>
          <el-table-column label="责任工区" prop="fromworkcentername" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="订单号" prop="mfgordername" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="机型" prop="familylistnames" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column label="零件图号" prop="productname" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="零件名称" prop="productdescription" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="流水卡号" prop="containername" width="200" show-overflow-tooltip></el-table-column>
          <el-table-column label="工序" prop="workflowstepname" width="160" show-overflow-tooltip></el-table-column>
          <el-table-column label="当前工序" prop="currentspec" width="160" show-overflow-tooltip></el-table-column>
          <el-table-column label="报工时间" prop="reportdate" width="100" :formatter="splitDate"></el-table-column>
          <el-table-column label="检验员" prop="checker" width="80" show-overflow-tooltip></el-table-column>
          <el-table-column label="检验时间" prop="checkdate" width="100" :formatter="splitDate"></el-table-column>
          <el-table-column label="备注" prop="notes" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column label="报废数" prop="lossqty" width="60"></el-table-column>
          <el-table-column label="合格数" prop="passqty" width="60"></el-table-column>
          <el-table-column label="工序类型" prop="spectype" width="80"></el-table-column>
          <el-table-column label="理化或计量" prop="entrustmeasurement" width="100">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.entrustmeasurement === '是'" type="warning">是</el-tag>
              <el-tag v-else type="info">否</el-tag>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination @current-change="handleFactoryChartDetailCurrentChange"
          :current-page="factoryChartDetail.queryInfo.currentPage" :page-sizes="[factoryChartDetail.queryInfo.pageSize]"
          :page-size="factoryChartDetail.queryInfo.pageSize" layout="prev,pager,next,jumper,sizes,total"
          :total="factoryChartDetail.total">
        </el-pagination>
      </el-dialog>

      <!-- 超x天待检统计 -->
      <el-dialog :title="checkStockChartDetail.title" :width="'98%'" :top="'10px'"
        :visible.sync="checkStockChartDetail.dialogVisiable" :center="true">
        <el-table v-loading="loading" v-loading.fullscreen.lock="loading" :element-loading-text="loadingText"
          element-loading-background="rgba(0,0,0,0.8)" :data="checkStockChartDetail.dataList" stripe border>
          <el-table-column type="index" width="50px"></el-table-column>
          <el-table-column label="操作" width="200">
            <template slot-scope="scope">
              <el-button type="primary" icon="el-icon-download" size="mini" @click="exportCheckStockChartDetail">
                导出
              </el-button>
              <el-button type="warning" icon="el-icon-check" size="mini" @click="validateRowData(scope.row)">
                校验
              </el-button>
            </template>
          </el-table-column>
          <el-table-column label="containersteprecordid" prop="containersteprecordid" v-if="false"></el-table-column>
          <el-table-column label="主制分厂" prop="factoryname" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="责任工区" prop="fromworkcentername" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="订单号" prop="mfgordername" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="机型" prop="familylistnames" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column label="零件图号" prop="productname" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="零件名称" prop="productdescription" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column label="流水卡号" prop="containername" width="200" show-overflow-tooltip></el-table-column>
          <el-table-column label="工序" prop="workflowstepname" width="160" show-overflow-tooltip></el-table-column>
          <el-table-column label="当前工序" prop="currentspec" width="80" show-overflow-tooltip></el-table-column>
          <el-table-column label="报工时间" prop="reportdate" width="100" :formatter="splitDate"></el-table-column>
          <el-table-column label="工序类型" prop="spectype" width="80"></el-table-column>
          <el-table-column label="等待时间" prop="delaydays" width="100">
            <template slot-scope="scope" v-if="scope.row.delaydays">
              {{scope.row.delaydays}}天
            </template>
          </el-table-column>
          <el-table-column label="理化或计量" prop="entrustmeasurement" width="100">
            <template slot-scope="scope">
              <el-tag v-if="scope.row.entrustmeasurement === '是'" type="warning">是</el-tag>
              <el-tag v-else type="info">否</el-tag>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination @current-change="handleCheckStockChartDetailCurrentChange"
          :current-page="checkStockChartDetail.queryInfo.currentPage"
          :page-sizes="[checkStockChartDetail.queryInfo.pageSize]" :page-size="checkStockChartDetail.queryInfo.pageSize"
          layout="prev,pager,next,jumper,sizes,total" :total="checkStockChartDetail.total">
        </el-pagination>
      </el-dialog>
    </div>
  </div>
  <script src="../Scripts/echarts/echarts-5.4.0.min.js"></script>
  <script type="module">
    import { barOption, colorList } from '../Scripts/hooks/chartConfig.js'
    import { exportExcelData, fetchSuggestion } from '../Scripts/hooks/useCommonMethod.js'
    import { getProductFamily, getWorkcenterList, getFactoryUsersByRoleName, getFactoryListByCode } from '../Scripts/hooks/fetchAPI.js'
    import { prevWeek, thisWeek, nextWeek, prevMonth, thisMonth, nextMonth } from '../Scripts/hooks/useDateShortCut.js'
    import { splitDate } from '../Scripts/hooks/format.js'
    import Vue2BoardHeader from '../Scripts/components/Vue2BoardHeader.js'
    const app = new Vue({
      el: '#app',
      components: { Vue2BoardHeader },
      data: {
        splitDate,
        loading: false,
        loadingText: '数据加载中...',
        queryInfo: {
          factoryname: '', // 主制分厂
          mfgordername: '', // 订单号
          workcentername: '',// 主制工区
          productfamilyname: '',
          productname: '',
          containername: '',
          checker: '', // 检验员
          reportdate: '',
          checkdate: '',
          interval: 2,
          spectype: ''
        },
        factoryList: [],
        workcenterList: [],
        productFamilyList: [],
        checkerList: [],
        spectypeList: [
          { spectype: '普通工序' },
          { spectype: '检验工序' },
          { spectype: '转工检验工序' }
        ],
        factoryChartDetail: {
          dialogVisiable: false,
          queryInfo: { factoryname: '', seriesName: '', currentPage: 1, pageSize: 13 },
          dataList: [], total: 0, title: ''
        },
        checkStockChartDetail: {
          dialogVisiable: false,
          queryInfo: { plandate: '', currentPage: 1, pageSize: 13 },
          dataList: [], total: 0, title: ''
        },
        // 表单验证
        rules: {
          reportdate: [{ required: true, message: '报工时间不能为空', trigger: 'change' }],
          interval: [{ required: true, message: '检验周期不能为空', trigger: 'blur' }]
        },
        chartHeight: 360,
        chartRow: 2,
        loadingConfig: { text: '数据查询中...', effect: 'whirling', maskColor: 'transparent', textColor: '#fff', color: '#66b1ff' },
        pickerOptions: { shortcuts: [prevWeek, thisWeek, nextWeek, prevMonth, thisMonth, nextMonth] }
      },
      methods: {
        searchContainerAsync(value, callback) {
          fetchSuggestion({ actionName: 'getContainernameAsync', name: 'containername', value, callback, triggerLength: 2 });
        },
        searchProductAsync(value, callback) {
          fetchSuggestion({ actionName: 'getProductnameAsync', name: 'productname', value, callback, triggerLength: 2 });
        },
        searchMfgorderAsync(value, callback) {
          fetchSuggestion({ actionName: 'getMfgordernameAsync', name: 'mfgordername', value, callback, triggerLength: 2 });
        },
        async factorySelectChange(val) {
          this.queryInfo.workcentername = null;
          this.queryInfo.checker = null;
          if (val) {
            const factoryname = val || this.queryInfo.factoryname;
            this.workcenterList = await getWorkcenterList({ factoryname: factoryname, isMapping: '是' });
            this.checkerList = await getFactoryUsersByRoleName({ rolename: '检验员', factoryname: factoryname, isMapping: '是' });
          }
        },
        // 超x天已检统计
        async getFactoryChartData() {
          const dom = document.getElementById("factoryChart");
          echarts.dispose(dom);
          let chart = echarts.init(dom);
          chart.showLoading(this.loadingConfig);

          const { data: { data, meta, total } } = await axios.post('../handler/board/ContainerCheckCycleDashBoard.ashx?action=getFactoryData', {
            type: 'getFactoryData',
            ...this.queryInfo
          })

          chart.hideLoading();
          if (meta.status === 500) { return this.$message.error(meta.msg); }
          if (data.length === 0) { return; }

          echarts.dispose(dom);
          chart = echarts.init(dom);

          let arrFactory = [], arrTotal = [], arrQty = [], arrNotCheck = [], arrDclQty = [], arrNotCheckDclQty = [];
          for (const i of data) {
            arrFactory.push(i.factoryname);
            arrQty.push(i.qty);
            arrTotal.push(i.total);
            arrNotCheck.push(i.notcheckqty);
            arrDclQty.push(i.dclqty);
            arrNotCheckDclQty.push(i.nocheckdclqty);
          }

          let option = barOption();
          option.legend.data = [
            '检验总任务数',
            `超${this.queryInfo.interval}天检验+超${this.queryInfo.interval}天未检`,
            `超${this.queryInfo.interval}天未检`,
            '待生产厂处理'
          ];

          option.xAxis.data = arrFactory;
          option.yAxis[1].show = false;

          option.series[0] = _.merge(option.series[0], {
            name: '检验总任务数',
            data: arrTotal,
            label: { color: colorList.blue.color },
            itemStyle: { color: { colorStops: colorList.blue.colorStops } }
          });

          option.series[1] = _.merge(_.cloneDeep(option.series[0]), {
            name: `超${this.queryInfo.interval}天检验+超${this.queryInfo.interval}天未检`,
            data: arrQty,
            label: { color: colorList.yellow.color },
            itemStyle: { color: { colorStops: colorList.yellow.colorStops } }
          });

          option.series[2] = _.merge(_.cloneDeep(option.series[0]), {
            name: `超${this.queryInfo.interval}天未检`,
            data: arrNotCheck,
            label: { color: colorList.red.color },
            itemStyle: { color: { colorStops: colorList.red.colorStops } }
          });

          option.series[3] = _.merge(_.cloneDeep(option.series[0]), {
            name: '待生产厂处理',
            data: arrNotCheckDclQty,
            label: { color: colorList.perple.color },
            itemStyle: { color: { colorStops: colorList.perple.colorStops } }
          });

          chart.setOption(option);

          window.addEventListener('resize', () => {
            chart.resize();
          });

          chart.on('click', (params) => {
            if (params.value == 0) { return; }
            this.factoryChartDetail.queryInfo.currentPage = 1;
            this.factoryChartDetail.queryInfo.factoryname = params.name;
            this.factoryChartDetail.queryInfo.seriesName = params.seriesName;
            this.factoryChartDetail.title = `【${params.name}】【${params.seriesName}】明细`;
            this.factoryChartDetail.dialogVisiable = true;
            this.getFactoryChartDetail();
          })
        },
        // 超x天已检明细
        async getFactoryChartDetail() {
          this.loading = true;
          this.loadingText = '数据加载中...';
          const { data: { data, meta, total } } = await axios.post('../handler/board/ContainerCheckCycleDashBoard.ashx?action=getFactoryChartDetail', {
            type: 'getFactoryChartDetail',
            ...this.queryInfo,
            ...this.factoryChartDetail.queryInfo
          })

          this.loading = false;
          if (meta.status === 500) { return this.$message.error(meta.msg); }
          this.factoryChartDetail.dataList = data;
          this.factoryChartDetail.total = total;
        },
        // 超x天已检明细导出
        exportFactoryChartDetail() {
          const config = {
            url: '../handler/board/ContainerCheckCycleDashBoard.ashx?action=exportFactoryChartDetail',
            data: {
              type: 'exportFactoryChartDetail',
              ...this.queryInfo,
              ...this.factoryChartDetail.queryInfo,
              title: this.factoryChartDetail.title
            }
          }
          exportExcelData(config, this);
        },
        // 超x天待检统计
        async getCheckStockData() {
          const dom = document.getElementById("checkStockChart");
          echarts.dispose(dom);
          let chart = echarts.init(dom);
          chart.showLoading(this.loadingConfig);

          const { data: { data, meta, total } } = await axios.post('../handler/board/ContainerCheckCycleDashBoard.ashx?action=getCheckStockData', {
            type: 'getCheckStockData',
            ...this.queryInfo
          })
          chart.hideLoading();
          if (meta.status === 500) { return this.$message.error(meta.msg); }
          if (data.length === 0) { return; }

          echarts.dispose(dom);
          chart = echarts.init(dom);

          let arrDate = [], arrQty = [];
          for (const i of data) {
            arrDate.push(i.plandate.split('T')[0]);
            arrQty.push(i.qty);
          }

          let option = barOption();
          option.legend.data = ['数量'];//设置图例文字
          option.xAxis.data = arrDate;//x轴数据
          option.xAxis.axisLabel.rotate = 45;
          option.xAxis.axisLabel.formatter = data => dayjs(data).format('MM-DD');
          option.yAxis[1].show = false;

          option.series[0] = _.merge(option.series[0], {
            name: '数量',
            data: arrQty,
            type: 'line',
            symbolSize: 10,
            lineStyle: { width: 3, color: colorList.blue.color },
            label: { color: '#fff' },
            itemStyle: { color: { colorStops: colorList.blue.colorStops } }
          });

          chart.setOption(option);
          window.addEventListener('resize', () => {
            chart.resize();
          });

          chart.on('click', (params) => {
            if (params.value == 0) { return; }
            this.checkStockChartDetail.queryInfo.currentPage = 1;
            this.checkStockChartDetail.queryInfo.plandate = params.name;
            this.checkStockChartDetail.title = `【${params.name}】超 ${this.queryInfo.interval} 天待检明细`
            this.checkStockChartDetail.dialogVisiable = true
            this.getCheckStockChartDetail();
          })
        },
        // 超x天待检统计明细
        async getCheckStockChartDetail() {
          this.loading = true;
          this.loadingText = '数据加载中...';
          const { data: { data, meta, total } } = await axios.post('../handler/board/ContainerCheckCycleDashBoard.ashx?action=getCheckStockChartDetail', {
            type: 'getCheckStockChartDetail',
            ...this.queryInfo,
            ...this.checkStockChartDetail.queryInfo
          })

          this.loading = false;
          if (meta.status === 500) { return this.$message.error(meta.msg); }
          this.checkStockChartDetail.dataList = data;
          this.checkStockChartDetail.total = total;
        },
        // 超x天待检统计明细导出
        exportCheckStockChartDetail() {
          const config = {
            url: '../handler/board/ContainerCheckCycleDashBoard.ashx?action=exportCheckStockChartDetail',
            data: {
              type: 'exportCheckStockChartDetail',
              ...this.queryInfo,
              ...this.checkStockChartDetail.queryInfo,
              title: this.checkStockChartDetail.title
            }
          }
          exportExcelData(config, this);
        },
        //查询数据
        async getData(currentpage) {
          this.$refs['queryInfoRef'].validate(async (valid) => {
            if (!valid) {
              return this.$message.error('必填项不能为空');
            } else {
              this.getFactoryChartData();
              this.getCheckStockData();
            }
          })
        },
        handleFactoryChartDetailCurrentChange(newPage) {
          this.factoryChartDetail.queryInfo.currentPage = newPage;
          this.getFactoryChartDetail();
        },
        handleCheckStockChartDetailCurrentChange(newPage) {
          this.checkStockChartDetail.queryInfo.currentPage = newPage;
          this.getCheckStockChartDetail();
        },
        // 校验数据
        async validateRowData(row) {
          const { containersteprecordid } = row;
          this.loading = true;
          this.loadingText = '数据加载中...';
          const { data: { data, meta, total } } = await axios.post('../handler/board/ContainerCheckCycleDashBoard.ashx?action=validateRowData', {
            type: 'validateRowData',
            containersteprecordid
          })
          this.loading = false;
          if (meta.status === 500) { return this.$message.error(meta.msg); }
          this.$message.success('校验成功');
        }
      },
      async mounted() {
        this.chartHeight = (window.innerHeight - 190 - this.chartRow * 40) / this.chartRow;
        window.addEventListener('resize', () => {
          this.chartHeight = (window.innerHeight - 190 - this.chartRow * 40) / this.chartRow;
        });
        const startOfMonth = dayjs().startOf('month').format('YYYY-MM-DD');
        const endOfMonth = dayjs().endOf('month').format('YYYY-MM-DD');
        this.queryInfo.reportdate = [startOfMonth, endOfMonth];
        this.productFamilyList = await getProductFamily();
        this.factoryList = await getFactoryListByCode({ factoryCode: '600|601|602|607|608|609', isMapping: '是' });
        this.getFactoryChartData();
        this.getCheckStockData();
      }
    })
  </script>
</body>

</html>